home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
asmsrc
/
tomlanvec.lha
/
Thomas-landspurg-source
/
sources.doc
< prev
Wrap
Text File
|
1990-09-26
|
3KB
|
103 lines
; DOC FOR THE SOURCECODE
1) What is this source
----------------------
You can have now the source that a lot of you dreamed to have (sorry
for my very bad english). This is the source of a simple 3d
programm. You can draw a little wire frame object in real time, and move it.
You can include this in your own demos.
2) How to assemble and use it?
------------------------------
There is two version,one for the great Devpack,and one for the lame
Seka.
- IF YOU HAVE SEKA ( -> try devpack2)
With seka,you have to do this:
load the file: r3d_source_seka<return>
assemble: a<RETURN><RETURN>
load the data: ri<RETURN>
df0:datasin<RETURN>
datasin<RETURN>
and run the pg: j<RETURN>
- IF YOU HAVE DEVPACK (good boy)
With Devpack,just assemble and run, but if you have devpack,you know
how to use it (file 3d_source.s).
The file DATASIN contain a sinus table (with a bad precision,I
know!)
-Move the object:
Now you see a 3d object. You can move it by pressing the arrow keys,
and the keys 0 and '.' .You can stop the object by pressing ESC.
You can change the object by pressing F1 or F2
3) How can I put my own objects?(take a look at the sourcecode!)
--------------------------------
First how the object are coded (quick explain)
An object is made of lines,each line is draw beetwen two points.
You have two arrays per object (you can have more than one object)
One array with the 3d coords(x,y,z) of each point.
One array with the number of the point wich have to be joined by a line.
Each object have his own structure wich contain:
- the number of points of the object
- the number of lines
- the speeds of rotation
- the angles of the object
- the pos (x,y,z) of the object
- the speed (speedx,speedy,speedz) of the object
- a pointer to the array of point(see below)
- a pointer to the array wich define the line (see below)
Look at the object2, it's a cube.
After,you have to put a pointer to this structure
in the TABOBJ array (like OBJET1 and OBJET2).
4) Important:
-------------
You can use this source,BUT:
- don't use it to do lames demos
- put in your scrolltext (or somewhere else) from whom you
get this source(from me!).
5) Some more infos:
-------------------
I put this source in public domain so a lot of debutant coders
can start easily to program.But I've removed a lot of thing,like the line
clipping. And I've not used all the posibilities of the assemblers,like
conditional assembly,macro or the use of structures (for devpack) for
more clarity.
There just one flag, taks_stop ,at the beginning of the file,if you
want to choose beetwen singletask or multi-tasks( but no intuition screens,
because the use of double -buffering,wich is not easy with intuition( or
a little bit too slow)).
Sorry,but for the moment the comments are only in French.
The pg use a matrice to compute the 3d pos of each point. This
take only 9 multiplication per point,instead of 12 mulitplication if
you use the common method (with three axis of rotation).
There is not a lot of optimisation, because it's an example!
6) Where can you send bug reports
---------------------------------
To
Thomas LANDSPURG
9,rue baldung-grien
67000 STRASBOURG
FRANCE